package com.xayy.health.mgt.mapper;

import cn.kawins.mybatis.BaseMapper;
import com.xayy.health.core.config.datasource.DatasourceSelector;
import com.xayy.health.mgt.model.TelemetryData;
import com.xayy.health.mgt.model.dto.DataFeatureDto;

import java.util.List;


/**
 * 遥测数据
 * @author zhangxa
 */

public interface TelemetryDataMapper extends BaseMapper<TelemetryData> {

    /**
     * 遥测数据
     *
     * @param dataFeatureDto 入参
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<TelemetryData> getYcList(DataFeatureDto dataFeatureDto);

    /**
     * 直接按时间查询遥测数据
     *
     * @param dataFeatureDto 入参
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<TelemetryData> getYcListByTimeRange(DataFeatureDto dataFeatureDto);

    /**
     * 剔野数据
     * @param dataFeatureDto 入参
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<TelemetryData> getTyList(DataFeatureDto dataFeatureDto);

    /**
     * 填充数据
     * @param dataFeatureDto 入参
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<TelemetryData> getTcList(DataFeatureDto dataFeatureDto);

    /**
     * 平滑数据
     *
     * @param dataFeatureDto 入参
     * @return List<TelemetryData>
     */
    @DatasourceSelector(sourceName = "clickhouse")
    List<TelemetryData> getPhList(DataFeatureDto dataFeatureDto);

    /**
     * 剔野数据插入
     *
     * @param telemetryData 遥测入参
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void insertTy(List<TelemetryData> telemetryData);

    /**
     * 填充数据插入
     *
     * @param telemetryData 遥测入参
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void insertTc(List<TelemetryData> telemetryData);

    /**
     * 平滑数据入参
     *
     * @param telemetryData 遥测入参
     */
    @DatasourceSelector(sourceName = "clickhouse")
    void insertPh(List<TelemetryData> telemetryData);

}
